[][src]Crate odata_client_codegen

Functionality to generate a rust source code module which represents Entity Data Model items for an OData endpoint. This generation can be performed as a procedural macro from the odata_client_derive crate, or as a build.rs action, using the write_module_build_artifact or generate_module functions.

Structs

ConstructConfig
ItemNameWhitelist

Traits

EntityModelFilter

Implemented by types which can specify the entity model item for which to generate client code. See the implementors which can be used as arguments for code generation functions (e.g. generate_module, write_module_build_artifact).

Functions

generate_module

Generate OData client token stream from XML string.

write_module_build_artifact

Convenience function to be used in a build script (build.rs). Generates an OData client module from the provided metadata XML, and writes to a location in the build output directory. Source XML filepath and target code filepath are specified relative to the crate/workspace root. To use the generated module, the user should manually declare a bodiless module within their code, and add the #[path = "..."] attribute, specifying the path to the generated module, relative to the consuming source file. E.g.: